1. Field of the Invention
The present invention relates to a power-saving method, and more particularly to a power-saving method of setting a Power-saving related flag.
2. Description of the Prior Art
The computer is one of the most popular tools that have been closely involved in human daily life. Almost all professions rely on the computer to make their work more efficient and easier. As the usage of computer grows even further, the need for a higher performance computer is likewise growing and getting bigger. More functions and more capacities are built into a single computer chip, and the clock speed of a central processing unit in a computer increases from the range of mega (106)/second to the range of giga (109)/second within few years. Not only the layout of computer hardware has become more complicated than before, but the coding of computer software application also has grown from millions of lines to billions of lines of code. The achievement of more functions, greater speed, and less power consumption presents a challenge for the designing of a modern computer.
Conflicts are usually found in saving computer power consumption while trying to maintain the computer performance. Higher processing speed and more complex calculation always mean more power consumption. However, not all computer applications require high processing speed and consume large system resources all the time. Dynamically adjusting system operating clock and system resources, thereby reducing system power consumption based on the needs of a computer application is a clever design to keep the system performance high and save the system power consumption at the same time. The following paragraphs first provide computer display background knowledge, illustrate some common computer system display architectures by examples, and then introduce computer power saving mechanisms and computer system display problems caused by the power saving mechanisms.
With graphic-intensive applications, high quality image data are required to be displayed correctly and with precision on a monitor device without any blinking, jittering, or delays. An amount of several megabytes image data needs to be dumped onto a monitor device per second to accomplish a continuous error free video-on-demand application. Such a graphic-intensive application can be a high-end computer-aided drafting (CAD) application, a multimedia game, MPEG (Moving Picture Experts Group) video playback, video conference, or one of many other real-time video applications. Typically, a graphic-intensive application contains a huge amount of image data that needs to be timely displayed onto a monitor device. Every complete screen of graphic information, known as a frame, has to be displayed precisely in time to avoid display blinking and jittering; as a result, the graphic processing mechanism needs to decode the image data fast enough. For instance, with a 640 times 480 pixels (horizontal times vertical), 32 bits true color, and 30 frames per second graphic application without compression, its image processor needs to process 36.864 megabytes image data per second to be able to display correctly. Moreover, as the typical resolution of a computer display has increased from 640 times 480 pixels to 800 times 600 pixels, 1024 times 768, 1280 times 1024 and beyond, and color information per pixel from 2 bits to 24 bits, 32 bits, and beyond, the processing speed and stability of a image processor also need to be increased multiplicatively.
Typically, to increase the image processing speed, a computer relies on a graphics processing unit, or a standalone graphics card (GFX, also known as a video card, graphic accelerator card, or a display adapter, etc.) to do graphics display on a monitor device. A graphics card usually contains a specialized processor or processors that are tailor-made for graphic rendering, and a set of memory ranging from one, two, four, eight, or sixteen megabytes and up, so that image frames can be stored in the graphics card. Thus, the set of memory installed in a graphic card is commonly known as a frame buffer.
A graphics card or a graphics processing unit can be built into a standalone chipset as demonstrated in FIG. 1, or it can be integrated into an existing chipset as depicted in FIG. 2. Referring to FIG. 1, a computer system 10 comprises a CPU 11, a system chipset 12, a data-path chipset 13, a system memory 14, a graphics processing unit 15, a frame buffer 16, display device 17, 19 and 20, and a built-in memory controller 18 inside the system chipset 12. The system chipset 12 is commonly referred to as North Bridge (NB), and the data-path chipset 13 is commonly referred to as South Bridge (SB). Each of the display devices can be a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), or any other advanced monitors. As a contrast to FIG. 1, in FIG. 2, a graphics processing unit 27 is integrated into the system chipset 22. And the placements of the CPU 21, the system memory 24, the memory controller 26, the data-path chipset 23, the system chipset 22, and display devices 25, 28 and 29 are similar to FIG. 1.
Usually, graphics information that is going to be displayed onto the display device is first stored in the system memory, and then transferred to a first-in-first-out (FIFO) buffer. A FIFO buffer display mechanism can make a request to access a system memory, and fill up its FIFO buffer with the graphic information. To a better explanation, the FIFO buffer display mechanism may be appreciated by a water tank analogy. Similar to water draining out from the bottom of a water tank at a constant rate and occasionally refilling from the top of the water tank, the FIFO display mechanism dumps image data to a display device at an invariant rate, and every so often receives image data from the system memory. Both the standalone graphics processing unit (as depicted in FIG. 1) and the on-chipset graphics processing unit (as depicted in FIG. 2) can directly access the system memory through the memory controller in the system chipset. In other words, the request of a system memory access can be made by the graphics processing unit (or the graphics card) without going through the CPU.
In addition to the computer system architectures demonstrated in FIG. 1 and FIG. 2, there are other computer system architectures in use. For instance, two of those computer system architectures are presented in FIG. 3 and FIG. 4. In FIG. 3, computer system architecture 30 is similar to the standalone graphics processing unit computer system 10 shown in FIG. 1 except that a system memory 34 is directly connected to a CPU 31 via a built-in memory controller 38. As the same in FIG. 4 and FIG. 2, both computer system architectures have their graphics processing units built into the system chipset, but in FIG. 4, the memory controller 46 is inside the CPU 41 and the system memory 44 is directly coupled to the CPU 41 via the built-in memory controller 46. Note that with the computer system architectures sketched in FIG. 3 and FIG. 4, a system memory access requested by the graphics processing units has to go through not only the system chipset but also the CPUs.
The increase of CPU workload often demands an increase in power consumption and results in a shorter battery life. The increased power consumption may cause a fatal problem to an application running on a mobile computer unit or a laptop computer. As a consequence, a variety of power saving techniques is introduced to the design of modern computers. A couple of power saving techniques are described as follows. When a CPU idles for a predetermined period of time, the CPU clock speed is reduced and the CPU power supply is turned off. Furthermore, instead of turning the CPU on and off, a mechanism that detects the power consumption level of an application several times every second and self-adjusts the CPU clock rate and power supply level to reduce power consumption is built into a computer. As a result, with the use of the power saving techniques, a battery can last longer and the capacity of a battery may be reduced to achieve the same performance.
Typically, a few microseconds to tens of microsecond is required to process the power saving mechanism. For instance, a range of ten microsecond of time is needed to detect the power consumption level of an application, and adjusts the CPU clock rate accordingly. During the execution of power saving mechanism, the CPU is completely idle and waits for the next alternative CPU clock rate to operate. Upon the CPU idle period, the graphics card or the graphics processing unit presented in FIG. 3 and FIG. 4 cannot access the memory controller that is built inside the CPU to obtain the required image/graphics data from the system memory. As the graphics processing unit cannot access the image/graphics data from system memory and in order to display smoothly, the solution will be increasing the frame buffer. However, the frame buffer costs a lot and by adding frame buffer will reduce the product competition in the market. The present invention provides a breakthrough solution to the conflict between power saving and continuous images/graphics data display in a modern computer design. And also, the present invention achieves the cost down.